cmake_minimum_required(VERSION 3.8)
project(test_working_dir)

enable_testing()
#add_test(NAME mytest COMMAND main)
add_test(NAME mytest COMMAND main WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/../main/build")
